<!DOCTYPE html>
<html>
<head>
    <title>啤模</title>
		<#include "/header.html">
</head>
<body>
<div id="rrapp" v-cloak>
    <div v-show="showList">
        <div class="grid-btn">
			<#if shiro.hasPermission("erp:pimoinfo:save")>
            <a class="btn btn-primary" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</a>
			</#if>
			<#if shiro.hasPermission("erp:pimoinfo:update")>
            <a class="btn btn-primary" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>
			</#if>
			<#if shiro.hasPermission("erp:pimoinfo:delete")>
            <a class="btn btn-primary" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
			</#if>
        </div>
        <table id="jqGrid"></table>
        <div id="jqGridPager"></div>
    </div>

    <div v-show="!showList" class="panel panel-default">
        <div class="panel-heading">{{title}}</div>
        <form class="form-horizontal">
														                    <div class="form-group">
                        <div class="col-sm-2 control-label">啤模编码</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="pimoInfo.pimoCode" placeholder="啤模编码"/>
                        </div>
                    </div>
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">啤模名称</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="pimoInfo.pimoName" placeholder="啤模名称"/>
                        </div>
                    </div>
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">客户编码</div>
                        <div class="col-sm-10">
<!--                             <input type="text" class="form-control" v-model="pimoInfo.customerCode" placeholder="客户编码"/> -->
                            <el-select v-model="customerCode" @change="vm.changeCustomer()" filterable placeholder="请选择">
							    <el-option
							      v-for="item in customerList"
							      :key="item.customerCode"
							      :label="item.customerCode"
							      :value="item.customerCode">
							    </el-option>
							  </el-select>
                        </div>
                    </div>
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">客户名称</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="pimoInfo.customerName" placeholder="客户名称"/>
                        </div>
                    </div>
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">纸质</div>
                        <div class="col-sm-10">
<!--                             <input type="text" class="form-control" v-model="pimoInfo.paperInfoId" placeholder="纸质"/> -->
                            <el-select v-model="pimoInfo.paperInfoId" filterable placeholder="请选择">
							    <el-option
							      v-for="item in paperInfoList"
							      :key="item.paperInfoId"
							      :label="item.paperName"
							      :value="item.paperInfoId">
							    </el-option>
							  </el-select>
                        </div>
                    </div>
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">货号</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="pimoInfo.goodsCode" placeholder="货号"/>
                        </div>
                    </div>
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">用料长</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="pimoInfo.usePaperLong" placeholder="用料长"/>
                        </div>
                    </div>
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">用料宽</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="pimoInfo.usePaperWeigth" placeholder="用料宽"/>
                        </div>
                    </div>
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">单位</div>
                        <div class="col-sm-10">
<!--                             <input type="text" class="form-control" v-model="pimoInfo.unitType" placeholder="单位"/> -->
                             <el-select v-model="unitType" @change="vm.changeUnit()" placeholder="请选择">
							    <el-option
							      v-for="item in unitTypeOptions"
							      :key="item.paramValue"
							      :label="item.paramValue"
							      :value="item.paramValue">
							     	 <span style="float: left">{{ item.paramValue }}</span>
                                  	 <span style="float: right; color: #8492a6; font-size: 13px">{{ item.paramType }}</span>
							    </el-option>
							  </el-select>
							  <input type="text" class="form-control" v-model="pimoInfo.unitValue"/>
                        </div>
                    </div>
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">一模成型数量</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="pimoInfo.pimoCount" placeholder="一模成型数量"/>
                        </div>
                    </div>
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">每箱用料比例</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="pimoInfo.useRate" placeholder="每箱用料比例"/>
                        </div>
                    </div>
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">存放位置</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="pimoInfo.letPlace" placeholder="存放位置"/>
                        </div>
                    </div>
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">组件编号</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="pimoInfo.commonCode" placeholder="组件编号"/>
                        </div>
                    </div>
							            <div class="form-group">
                <div class="col-sm-2 control-label"></div>
                <input type="button" class="btn btn-primary" @click="saveOrUpdate" value="确定"/>
                &nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="返回"/>
            </div>
        </form>
    </div>
</div>

<script src="${request.contextPath}/statics/js/modules/erp/pimoinfo.js?_${.now?long}"></script>
</body>
</html>